home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / bildschirmschoner / bserver_v1.5 / sources.lha / Sources / include / server.h < prev   
C/C++ Source or Header  |  1995-11-08  |  4KB  |  175 lines

  1. /*
  2.  * Server.h 1.5
  3.  * Copyright © 1995 by Stefano Reksten of 3AM - The Three Amigos!!!
  4.  * All rights reserved.
  5.  *
  6.  * DON'T FOOL WITH THIS FILE! It's BServer private only. Modifying
  7.  * anything could bring to unpredictable results. Moreover your
  8.  * programs would not be compatible with future releases of this
  9.  * program. :-)
  10.  *
  11.  */
  12.  
  13. #ifndef SERVER_H
  14. #define SERVER_H
  15.  
  16. #define PROGRAMNAME    "BServer"
  17. #define PROGRAMVERSION    "1.5"
  18.  
  19.  
  20. #ifndef EXEC_TYPES_H
  21. #include <exec/types.h>
  22. #endif
  23.  
  24. #ifndef EXEC_PORTS_H
  25. #include <exec/ports.h>
  26. #endif
  27.  
  28. #ifndef EXEC_INTERRUPTS_H
  29. #include <exec/interrupts.h>
  30. #endif
  31.  
  32. #ifndef GRAPHICS_DISPLAYINFO_H
  33. #include <graphics/displayinfo.h>
  34. #endif
  35.  
  36. /* Server status */
  37.  
  38. #define MUST_RETRY 0
  39. #define MUST_BLANK 1
  40. #define IDLE       2
  41. #define BLANKING   3
  42.  
  43. /* Client actions */
  44.  
  45. #define ACTION_IDLE        0
  46. #define ACTION_ARRIVED     1
  47. #define ACTION_LEAVING     2    /* removed, use ACTION_FAILED */
  48. #define ACTION_FAILED      3
  49.  
  50. /* Server commands */
  51.  
  52. #define COMMAND_IDLE        0
  53. #define COMMAND_QUIT        1
  54.  
  55. #define PROGRAMNAME    "BServer"
  56. #define PROGRAMVERSION    "1.5"
  57.  
  58.  
  59. #define SERVERPORTNAME PROGRAMNAME"Port"
  60.  
  61. /*=========================================================*/
  62. /*=== ClientMessage =======================================*/
  63. /*=========================================================*/
  64.  
  65. struct ClientMessage {
  66.     struct Message cm_Msg;
  67.     struct DisplayIDInformation *DInfo;
  68.     ULONG cm_Action;
  69.     };
  70.  
  71. /*=========================================================*/
  72. /*=== ServerMessage =======================================*/
  73. /*=========================================================*/
  74.  
  75. struct ServerMessage {
  76.     struct Message sm_Msg;
  77.     ULONG sm_Command;
  78.     APTR sm_Data;
  79.     };
  80.  
  81. /*=========================================================*/
  82. /*=== ClientNode ==========================================*/
  83. /*=========================================================*/
  84.  
  85. #define CLIENTNAME_MAXLENGTH 50
  86. #define PROGNAME_MAXLENGTH 150
  87. #define ARGS_MAXLENGTH 1024
  88.  
  89. struct ClientNode {
  90.     struct Node cn_Node;
  91.     char cn_ClientName[CLIENTNAME_MAXLENGTH];
  92.     char cn_ClientProg[PROGNAME_MAXLENGTH];
  93.     char cn_ClientArgs[ARGS_MAXLENGTH];
  94.     };
  95.  
  96. /*=========================================================*/
  97. /*=== ModeNode ============================================*/
  98. /*=========================================================*/
  99.  
  100. struct ModeNode
  101.     {
  102.     struct Node mn_Node;
  103.     UWORD mn_Index;
  104.     ULONG mn_DisplayID;
  105.     char mn_Name[DISPLAYNAMELEN];
  106.     };
  107.  
  108. /*=========================================================*/
  109. /*=== DisplayIDInformation ================================*/
  110. /*=========================================================*/
  111.  
  112. struct DisplayIDInformation
  113.     {
  114.     struct DisplayInfo   di_DisplayInfo;
  115.     struct DimensionInfo di_DimensionInfo;
  116.     struct MonitorInfo   di_MonitorInfo;
  117.     UBYTE di_Brightness;
  118.     UBYTE di_Volume;
  119.     STRPTR di_Args;
  120.     };
  121.  
  122. /*=========================================================*/
  123. /*=== Gadgets IDs =========================================*/
  124. /*=========================================================*/
  125.  
  126. #define TIMEOUT_GDG    0
  127. #define CHANGETIME_GDG 1
  128. #define RANDOM_GDG     2
  129. #define ACTIVE_GDG     3
  130. #define HIDE_GDG       4
  131. #define QUIT_GDG       5
  132. #define BLANK_GDG      6
  133. #define KILL_GDG       7
  134. #define LIST_GDG       8
  135. #define MODEID_GDG     9
  136. #define ADDCLIENTS_GDG 10
  137. #define CLIENTARGS_GDG 11
  138. #define BRILEVEL_GDG   12
  139. #define SNDLEVEL_GDG   13
  140.  
  141. #define MENUID_ABOUT 1
  142. #define MENUID_HIDE 2
  143. #define MENUID_QUIT 3
  144. #define MENUID_RAWMOUSE 4
  145. #define MENUID_DISK 5
  146.  
  147. /*=========================================================*/
  148. /*=== HotKey events =======================================*/
  149. /*=========================================================*/
  150.  
  151. #define EVT_HOTKEY 1L
  152. #define EVT_BLANKKEY 2L
  153.  
  154. /*=====================================================*/
  155. /*=== SVX and Module structures =======================*/
  156. /*=====================================================*/
  157.  
  158. typedef struct {
  159.     UBYTE Volume;
  160.     ULONG Period;
  161.     ULONG DataLength;
  162.     BYTE *AudioData;
  163.     /* REALLY private */
  164.     struct IOAudio *AudioIO;
  165.     } Sound;
  166.  
  167. typedef struct {
  168.     APTR m_Data;
  169.     /* REALLY private */
  170.     struct Interrupt m_Int;
  171.     BOOL m_IntInstalled;
  172.     } Module;
  173.  
  174. #endif
  175.